package com.farm.shop.service.impl;

import com.farm.shop.dao.FarmShopDao;
import com.farm.shop.domain.FarmShopDO;
import com.farm.shop.service.FarmShopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service
public class FarmShopServiceImpl implements FarmShopService {
    @Autowired
    private FarmShopDao farmShopDao;

    @Override
    public FarmShopDO get(Long id) {
        return farmShopDao.get(id);
    }

    @Override
    public List<FarmShopDO> list(Map<String, Object> map) {
        return farmShopDao.list(map);
    }

    @Override
    public int count(Map<String, Object> map) {
        return farmShopDao.count(map);
    }

    @Override
    public int save(FarmShopDO farmShop) {
        return farmShopDao.save(farmShop);
    }

    @Override
    public int update(FarmShopDO farmShop) {
        return farmShopDao.update(farmShop);
    }

    @Override
    public int remove(Long id) {
        return farmShopDao.remove(id);
    }

    @Override
    public int batchRemove(Long[] ids) {
        return farmShopDao.batchRemove(ids);
    }

    @Override
    public Boolean updateStatusById(Long id) {
        return farmShopDao.updateStatusById(id) > 0;
    }

    @Override
    public List<FarmShopDO> search(String keyword) {
        return farmShopDao.search(keyword);
    }


}
